/*
 * Main
 *
 * SJSU CS 149 Spring 2009 Project
 *
 * Copyright 2009 Timmy Yee
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import javax.swing.JFrame;

/**
 * The Main class contains the entry point of the simulator program.
 *
 * @author Timmy Yee
 */
public final class Main
{
    /** The name displayed in the title bar of the display GUI. */
    private static final String TITLE = "Operating System Simulator";
    /** The starting horizontal position of the display GUI. */
    private static final int POSITION_X = 200;
    /** The starting vertical position of the display GUI. */
    private static final int POSITION_Y = 200;
    /** The pixel width of the display GUI. */
    private static final int WIDTH = 800;
    /** The pixel height of the display GUI. */
    private static final int HEIGHT = 600;

    /**
     * A private constructor to prevent instantiating this static class.
     */
    private Main() {}

    /**
     * The entry point of the simulator program.
     * <p>
     * It creates the simulator GUI. The display GUI that the user will use
     * to load in data files and watch simulation runs in the trace text
     * box.
     *
     * @param args The program arguments. These are ignored.
     */
    public static void main(String[] args)
    {
        JFrame frame = new JFrame();

        frame.setTitle(TITLE);
        frame.setBounds(POSITION_X, POSITION_Y, WIDTH, HEIGHT);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setResizable(false);

        frame.add(Display.newWholePanel(frame));
        frame.setVisible(true);
    }
}

